import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../layout/Index.vue'
import Login from '../views/Login/Login.vue'
import PublicDisk from '../views/common/PublicDisk/PublicDisk.vue'
import PrivateDisk from '../views/common/PrivateDisk/PrivateDisk.vue'
import DownloadList from '../views/common/DownloadList/DownloadList.vue'
import My from '../views/common/My/My.vue'
import VideoPlayer from '../components/VideoPlayer.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/common',
        name: 'Index',
        component: Index,
        children: [
            {
                path: '/common/publicdisk',
                component: PublicDisk
            },
            {
                path: '/common/privatedisk',
                component: PrivateDisk
            },
            {
                path: '/common/downloadlist',
                component: DownloadList
            },
            {
                path: '/common/my',
                component: My
            }
        ]
    },
    {
        path: '/',
        name: 'Login',
        component: Login
    },
    {
        path: '/videoplayer',
        name: 'VideoPlayer',
        component: VideoPlayer
    }
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
